package com.util.vmsg.beans;

import java.util.logging.Logger;

import javax.servlet.http.HttpServletRequest;

import com.req.vmsg.util.TxtWebConstants;


public class TxtWebMessage {
	
    private static final Logger log = Logger.getLogger(TxtWebMessage.class.getName());

	private String txtWebMobileNumber;
	private String txtWebMessage;
	private String txtWebMessageId;
	private String txtWebMessageVerificationId;
	private String txtWebProtocol;
	
	private String helpMessage;
	private boolean isDataValid = false;
	private String requestType;
	
	public String getTxtWebMobileNumber() {
		return txtWebMobileNumber;
	}
	public void setTxtWebMobileNumber(String txtWebMobileNumber) {
		this.txtWebMobileNumber = txtWebMobileNumber;
	}
	public String getTxtWebMessage() {
		return txtWebMessage;
	}
	public void setTxtWebMessage(String txtWebMessage) {
		this.txtWebMessage = txtWebMessage;
	}
	public String getTxtWebMessageId() {
		return txtWebMessageId;
	}
	public void setTxtWebMessageId(String txtWebMessageId) {
		this.txtWebMessageId = txtWebMessageId;
	}
	public String getTxtWebMessageVerificationId() {
		return txtWebMessageVerificationId;
	}
	public void setTxtWebMessageVerificationId(String txtWebMessageVerificationId) {
		this.txtWebMessageVerificationId = txtWebMessageVerificationId;
	}
	public String getTxtWebProtocol() {
		return txtWebProtocol;
	}
	public void setTxtWebProtocol(String txtWebProtocol) {
		this.txtWebProtocol = txtWebProtocol;
	}
	public String getHelpMessage() {
		return helpMessage;
	}
	public void setHelpMessage(String helpMessage) {
		this.helpMessage = helpMessage;
	}
	public boolean isDataValid() {
		return isDataValid;
	}
	public void setDataValid(boolean isDataValid) {
		this.isDataValid = isDataValid;
	}
	public String getRequestType() {
		return requestType;
	}
	public void setRequestType(String requestType) {
		this.requestType = requestType;
	}
	
	TxtWebMessage(String argTxtWebMobileNumber, String argTxtWebMessage, String argTxtWebMessageId, String argTxtWebMessageVerificationId, String argTxtWebProtocol)
	{
		this.txtWebMobileNumber = argTxtWebMobileNumber;
		this.txtWebMessage = argTxtWebMessage;
		this.txtWebMessageId = argTxtWebMessageId;
		this.txtWebMessageVerificationId = argTxtWebMessageVerificationId;
		this.txtWebProtocol = argTxtWebProtocol;		
	}
	
	public TxtWebMessage() {
		// TODO Auto-generated constructor stub
	}
	
	public void applyRequestValues(HttpServletRequest req) {
		this.txtWebMobileNumber = req.getParameter(TxtWebConstants.RequestParams.TXTWEB_MOBILE_NUMBER);
		this.txtWebMessage = req.getParameter(TxtWebConstants.RequestParams.TXTWEB_MESSAGE);
		this.txtWebMessageId = req.getParameter(TxtWebConstants.RequestParams.TXTWEB_MESSAGEID);
		this.txtWebMessageVerificationId = req.getParameter(TxtWebConstants.RequestParams.TXTWEB_VERIFICATIONID);
		this.txtWebProtocol = req.getParameter(TxtWebConstants.RequestParams.TXTWEB_PROTOCOL);
		
		logTxtWebMessageVO();
	}
	
	public void logTxtWebMessageVO()
	{
		log.info("txtWebMobileNumber = " + this.txtWebMobileNumber);
		log.info("txtWebMessage = " + this.txtWebMessage);
		log.info("txtWebMessageId = " + this.txtWebMessageId);
		log.info("txtWebMessageVerificationId = " + this.txtWebMessageVerificationId);
		log.info("txtWebProtocol = " + this.txtWebProtocol);
	}
}
